package org.future.task.core.monitor;

import com.sun.net.httpserver.HttpServer;

import java.net.InetSocketAddress;

/**
 * @author Dongwei-Chen
 * @Date 2019/5/28 15:13
 * @Description 监控队列数据
 */
public class HttpClient {

    private Integer port;

    private String path;

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public void httpClient() throws Exception{
        HttpServer server=HttpServer.create(new InetSocketAddress(port),0);
        server.createContext(path,new HttpHandlerShow());
        server.start();
    }
}
